package com.harry.resource.workflow.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.harry.basis.BasePoEntity;
import static com.harry.configuration.ConstSettings.*;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
public class WorkFlowVariable extends BasePoEntity {

	private static final long serialVersionUID = 1L;

	@Column(length = TEXT_LENGTH, nullable = false)
	private String property;

	@Column(length = BASIC_LENGTH, nullable = false)
	private String entityType;

	@Column(length = BASIC_LENGTH, nullable = false)
	private String identity;

	@ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
	@JoinColumn(nullable = false, updatable = false)
	private WorkFlowInstance flowInstance;
}
